Jamie's Guide to Editing Headlines and Writing New Ones
— Astounding Pix Inside!
You'll need to know a little about ResEdit to follow these instructions. Someday in the far-distant future, this may be built into the module itself. For now, it's ResEdit.
The TEXT resource with ID 128 determines what words go up on the screen. Open that up and you'll see a long list of somewhat-familiar-looking text. The text is actually "code" in a very primitive "language," if you will. We're going to learn how the language is set up.
The language is line-oriented; that is, a line is a unit.
There are two types of lines: class declarations, and definitions. Each definition belongs to the class that was most recently declared, and each class must have at least one definition. For example, the first class is named "IMPRESSIVE". The first definition in the class "IMPRESSIVE" is "Amazing"; the second, "Astounding"; and so on.
Class declarations must begin with a percent-sign. All of Headlines' classes are in all caps, but this is for readability only. A class can have as many definitions as you like.
If you look down a ways, you'll see the definition "\NUMBER1 Shocking Weeks"--it belongs to the class "BADTIME". The word "\NUMBER1" is a reference to another class, named, as you might expect, "NUMBER1". Here's where the power comes from: any word beginning with a backslash must be the name of another class; and, when the headline is displayed, that word is replaced by a random selection from that class. "NUMBER1" is defined somewhere in the middle of the file, and its eight definitions are simply the written-out numbers for two through nine. So "\NUMBER1 Shocking Weeks" will get turned into one of "Two Shocking Weeks," "Three Shocking Weeks," etc.
Scroll down a ways further until you get to the declaration of the class "MATTRACTIVE". (The "M" stands for "male".) Note that the first definition in the class has "(2)" in front of it. That's the "weight" for that particular definition, which affects how often it will be picked. Definitions that don't specify their weight have a weight of one. So, of the five definitions of "MATTRACTIVE", "Manly" will be chosen two times in eight, "Blond" two times, "Hunky" and "Naked" once each, and "\ATTRACTIVE" (which will be expanded into one of the definitions in the class "ATTRACTIVE") will be chosen two times.
A few lines down is "%MATTRACTIVEPERSON," which is the declaration of the class "MATTRACTIVEPERSON". Note that this declaration ends in "{s}". Any characters between the braces are known as the _tags_ that the class knows about. By convention, the "s" tag indicates plurality, the "d" tag indicates past tense, and the "a" tag indicates the indefinite article. You are free to make up your own, of course. Now, since the class "MATTRACTIVEPERSON" has to know about the "s" tag, definitions in this class should expect that they may be asked to be pluralized. You can see how this works: a definition reads "Boy{|s}". The characters between the "{" and the "|" are what are used if the class was invoked with no tags; the characters between the "|" and the "}" are used if the "s" tag is used. Note that, unlike class declarations in which the braces always go at the end of the line, definitions can have as many sets of braces as they like. Scroll down to the definition for "FRUIT" to see an example of a class that has multiple tags.
Now, how do you invoke a class with tags? Simple--you write it like usual, but you stick a forward slash ("/") and your tags on the end. If you want a plural MATTRACTIVEPERSON, write "\MATTRACTIVEPERSON/s".
If you want your definition to pass along its tags to a class, stick a "/&" on the end of the class name. For an example, see the first two definitions of "ATTRACTIVEPERSON."
You're almost done, just a few more things to know. To embed a carriage return in a definition, write "\!". Blank lines are forbidden, so if you want a chance for a class to expand to nothing, you'll have to write "(x)", where x is the appropriate chance, even if x is one. To write a comment on a line, write "\*", and everything from there to the end of the line will be ignored. The resource must end with the line "%%". And, the class that starts it all off has the name "MAIN", which in Headlines contains the single definition "\CONST". Scroll down to the very end to see the many definitions of "CONST".
Here's how to add a headline. Scroll down to the very end, click right before the "%%", and type, on a line by itself:
(999)\UNUSUAL \SPIRITUAL \RELATIVE Found in \DEFINITEPLACE\PROOF
Then save the file, close it, and activate the screensaver. Your new headline should come up almost every time—that's why the "(999)" is there.